<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<script type="text/javascript">
	var isIn='${assetInfo.isIn}';
	//alert(isIn);
	if(isIn==""||isIn==null){ 
		$(".isIn option",navTab.getCurrentPanel()).val("1010302");
	}
	$(".isIn",navTab.getCurrentPanel()).addClass("required");
	function newPatient(){
		if($(".isIn",navTab.getCurrentPanel()).val()=="1010301"){
			$("#company",navTab.getCurrentPanel()).show();
			$(".company",navTab.getCurrentPanel()).addClass("required");
			$("#department",navTab.getCurrentPanel()).hide();
			$(".department",navTab.getCurrentPanel()).removeClass("required");
			$(".department",navTab.getCurrentPanel()).val("");
			$("#principal",navTab.getCurrentPanel()).hide();
			$(".principal",navTab.getCurrentPanel()).removeClass("required");
			$(".principal",navTab.getCurrentPanel()).val("");
		  }else {
			  $("#department",navTab.getCurrentPanel()).show();
			  $(".department",navTab.getCurrentPanel()).addClass("required");
			  $("#principal",navTab.getCurrentPanel()).show();
			  $(".principal",navTab.getCurrentPanel()).addClass("required");
			  $(".company",navTab.getCurrentPanel()).removeClass("required");
			  $(".company",navTab.getCurrentPanel()).val("");
			  $("#company",navTab.getCurrentPanel()).hide();
		}
	}
</script>
<div class="pageContent">
	                                
     <div id="resultBox"></div>
	<form method="post" action="${path }/asset/assetAction!distributed.action" 
	class="pageForm required-validate" id="productBean" onsubmit="return validateCallback(this, navTabAjaxDone);">
<input type = "hidden" name = "navTabId" id = "navTabId" value="${navTabId }" />
<div class="pageContent">
		<div class="pageFormContent" layoutH="80">
		<div class="tip"><span>派发资产 【${assetInfo.name}】</span></div><div>
		<input type = "hidden" name="assetInfo.id" value = "${assetInfo.id}" />
			<p>
				<label>是否外驻：</label>
				<select id="province" class="isIn" onchange="newPatient()" name="isIn" rel="iselect" loadUrl="${path}/hpin/sysDictType!treeRegion.action?defaultID=10103">
					<option value="${assetInfo.isIn}"></option>
				</select>
			</p> 
			<p id="company">
				<label>入驻公司：</label>
				<input type="text" name="distributed.company" class="company"   maxlength="50" size="30" />
			</p>
			
			<p id="department">
				<label>接收部门：</label>
				<input type="hidden" size="32"  name="department" bringBackName = "user.deptId" value="${ user.deptId }" />
				 <input type="text"  bringBackName = "user.deptName" maxlength="32" size="30" value="${user.deptName }"/>
				 
				 <%-- <a style="z-index: 9999" class="btnLook" href="${path }/um/dept!lookUpDept.action" lookupGroup="dept">查找带回</a> --%>
			</p>
			<p id="principal">
				<label>接收人：</label>
				<input type="hidden" size="32" name="userId"   bringBackName = "user.id" value="${ user.id }" />
				 <input type="text" name="principal"  bringBackName = "user.userName" maxlength="32" size="30" value="${user.userName }"/>
				 <a style="z-index: 9999" class="btnLook" href="${path }/um/user!lookUpUser.action" lookupGroup="user">查找带回</a>
				<!-- <input type="text" name="principal" class="principal"   maxlength="50" size="30" /> -->
			</p>
			<p id="storageplace">
				<label>存放地址：</label>
				<input type="text" name="storageplace" class="storageplace required"   maxlength="50" size="30"/>
			</p>
			
			
			<div class="tip"><span>备注：</span></div>
			<p>
				<label>备注：</label>
				<textarea cols="35" rows="2" name="distributed.remark" style="width:570px;"></textarea>
			</p>
			
		</div>
		
		</div>
</div>
 <div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit" onclick="doit();" >保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="reset">重置</button></div></div>
				</li>
			</ul>
		</div>
</form>
</div>
